package com.jy.project.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank ;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class MaterialDTO {

    @NotBlank (message = "物资分类编号不能为空")
    private String assetClassNo;

    @NotBlank (message = "物资分类名称不能为空")
    private String assetClassName;

    private String materialNo;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotBlank (message = "业务日期不能为空")
    private String businessDay;

    private String name;

    /**
     * 规格类型
     */
    @NotBlank (message = "规格类型不能为空")
    private String planningType;

    /**
     * 单位编号
     */
    @NotBlank (message = "单位编号不能为空")
    private String unitNo;

    /**
     * 单位名称
     */
    @NotBlank (message = "单位名称不能为空")
    private String unitName;

    /**
     * 所属公司编号
     */
    @NotBlank (message = "所属公司编号不能为空")
    private String companyNo;

    /**
     * 所属公司名称
     */
    @NotBlank (message = "所属公司名称不能为空")
    private String companyName;

    /**
     * 变动类型
     */
    private String changeType;

    /**
     * 购买日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotBlank (message = "购买日期不能为空")
    private String buyDay;

    /**
     * 发票类型
     */
    private String invoiceNo;

    /**
     * 发票名称
     */
    private String invoiceName;

    /**
     * 函数金额
     */
    private BigDecimal amountIncludingTax;

    /**
     * 不含税金额
     */
    private BigDecimal amountExcludingTax;

    /**
     * 管理公司编号
     */
    @NotBlank (message = "管理公司编号不能为空")
    private String managementCompanyNo;

    /**
     * 管理公司名称
     */
    @NotBlank (message = "管理公司名称为空")
    private String managementCompanyName;

    /**
     * 管理部门编号
     */
    @NotBlank (message = "管理部门编号不能为空")
    private String managementDeptNo;

    /**
     * 管理部门名称
     */
    @NotBlank (message = "管理部门名称不能为空")
    private String managementDeptName;

    /**
     * 管理人Id
     */
    @NotNull(message = "管理人Id不能为空")
    private Long managementUserId;

    /**
     * 管理人名称
     */
    @NotBlank (message = "管理人名称不能为空")
    private String managementNickName;

    /**
     * 使用公司编号
     */

    private String useCompanyNo;

    /**
     * 使用名称
     */
    private String useCompanyName;

    /**
     * 使用部门编号
     */
    private String useDeptNo;

    /**
     * 使用部门名称
     */
    private String useDeptName;

    /**
     * 使用人ID
     */
    private Long useUserId;

    /**
     * 使用人姓名
     */
    private String useNickName;

    /**
     * 位置区域编号
     */
    private String reginNo;

    /**
     * 位置区域名称
     */
    private String reginName;

    /**
     * 存放位置
     */
    private String storageLocation;

    /**
     * 供应商
     */
    private String supplier;

    /**
     * 来源编号
     */
    private String sourceNo;

    /**
     * 来源名称
     */
    private String sourceName;

    /**
     * 图片
     */
    private String img;

    /**
     * 扩展字段
     */
    private String ext;


    private String qualityStatus;
    /**
     * 备注
     */
    private String remarks;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateDay;

    private Date createAt;

    private Date updateAt;

    private Integer isDelete;

    private Integer status;

    /**
     * 操作人
     */
    private Long createUserId;

    List<MaterialAttrValueDTO> attrs;

    @Override
    public String toString() {
        return "MaterialDTO{" +
                "assetClassNo='" + assetClassNo + '\'' +
                ", assetClassName='" + assetClassName + '\'' +
                ", materialNo='" + materialNo + '\'' +
                ", businessDay='" + businessDay + '\'' +
                ", name='" + name + '\'' +
                ", planningType='" + planningType + '\'' +
                ", unitNo='" + unitNo + '\'' +
                ", unitName='" + unitName + '\'' +
                ", companyNo='" + companyNo + '\'' +
                ", companyName='" + companyName + '\'' +
                ", changeType='" + changeType + '\'' +
                ", buyDay='" + buyDay + '\'' +
                ", invoiceNo='" + invoiceNo + '\'' +
                ", invoiceName='" + invoiceName + '\'' +
                ", amountIncludingTax=" + amountIncludingTax +
                ", amountExcludingTax=" + amountExcludingTax +
                ", managementCompanyNo='" + managementCompanyNo + '\'' +
                ", managementCompanyName='" + managementCompanyName + '\'' +
                ", managementDeptNo='" + managementDeptNo + '\'' +
                ", managementDeptName='" + managementDeptName + '\'' +
                ", managementUserId=" + managementUserId +
                ", managementNickName='" + managementNickName + '\'' +
                ", useCompanyNo='" + useCompanyNo + '\'' +
                ", useCompanyName='" + useCompanyName + '\'' +
                ", useDeptNo='" + useDeptNo + '\'' +
                ", useDeptName='" + useDeptName + '\'' +
                ", useUserId=" + useUserId +
                ", useNickName='" + useNickName + '\'' +
                ", reginNo='" + reginNo + '\'' +
                ", reginName='" + reginName + '\'' +
                ", storageLocation='" + storageLocation + '\'' +
                ", supplier='" + supplier + '\'' +
                ", sourceNo='" + sourceNo + '\'' +
                ", sourceName='" + sourceName + '\'' +
                ", img='" + img + '\'' +
                ", ext='" + ext + '\'' +
                ", qualityStatus='" + qualityStatus + '\'' +
                ", remarks='" + remarks + '\'' +
                ", updateDay=" + updateDay +
                ", createAt=" + createAt +
                ", updateAt=" + updateAt +
                ", isDelete=" + isDelete +
                ", status=" + status +
                ", createUserId=" + createUserId +
                ", attrs=" + attrs +
                '}';
    }
}
